package com.sfeir.client.util;

/**
 * Utilitary class
 * 
 * @author Oussama Zoghlami
 * @date 30/12/2011
 * 
 */
public class Utils {

	/**
	 * Method allowing to return the number of stars associated to a given score
	 * 
	 * @param score
	 * @return
	 */
	public static int getScoreStars(int score, int level) {
		int multiplier = 1 + level / 10;
		if (score <= 100 * multiplier) {
			return 3;
		} 
		if (score <= 150 + 150 * multiplier) {
			return 2;
		} 
		if (score <= 600 + 150 * multiplier) {
			return 1;
		} 
		return 0;
	}
}
